package testproject;

import java.util.regex.Pattern;
import java.util.concurrent.TimeUnit;

import org.junit.*;

import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.*;

import org.openqa.selenium.*;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.support.ui.Select;

public class methodsClass {
	
		@Before
		public WebDriver setUp() throws Exception {
			WebDriver driver;
			driver = new FirefoxDriver();
			return driver;
		}

		public void loginSuccess(WebDriver driver) {
		  
		
		  driver.get("https://service.wmappbuilder.com/appbuilder/login");
		  driver.findElement(By.id("j_username")).clear();
		  driver.findElement(By.id("j_password")).clear();
		  driver.findElement(By.id("j_username")).sendKeys("bojan.peric");
		  driver.findElement(By.id("j_password")).sendKeys("Bp789Dev");
		  driver.findElement(By.id("proceed")).click();
		  driver.findElement(By.id("close")).click();
	}
	
}
